package com.ruoyi.hualian.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hualian.mapper.HlDeliveryTimeMapper;
import com.ruoyi.hualian.domain.HlDeliveryTime;
import com.ruoyi.hualian.service.IHlDeliveryTimeService;

/**
 * 货期Service业务层处理
 * 
 * @author hujian
 */
@Service
public class HlDeliveryTimeServiceImpl implements IHlDeliveryTimeService 
{
    @Autowired
    private HlDeliveryTimeMapper hlDeliveryTimeMapper;

    /**
     * 根据集合插入数据库
     * @param hlDeliveryTimes 集合
     * @return 结果
     */
    @Override
    public int insertList(List<HlDeliveryTime> hlDeliveryTimes) {
        return hlDeliveryTimeMapper.insertList(hlDeliveryTimes);
    }

    /**
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     */

    /**
     * 查询货期
     * 
     * @param deliveryId 货期主键
     * @return 货期
     */
    @Override
    public HlDeliveryTime selectHlDeliveryTimeByDeliveryId(Long deliveryId)
    {
        return hlDeliveryTimeMapper.selectHlDeliveryTimeByDeliveryId(deliveryId);
    }

    /**
     * 查询货期列表
     * 
     * @param hlDeliveryTime 货期
     * @return 货期
     */
    @Override
    public List<HlDeliveryTime> selectHlDeliveryTimeList(HlDeliveryTime hlDeliveryTime)
    {
        return hlDeliveryTimeMapper.selectHlDeliveryTimeList(hlDeliveryTime);
    }

    /**
     * 新增货期
     * 
     * @param hlDeliveryTime 货期
     * @return 结果
     */
    @Override
    public int insertHlDeliveryTime(HlDeliveryTime hlDeliveryTime)
    {
        return hlDeliveryTimeMapper.insertHlDeliveryTime(hlDeliveryTime);
    }

    /**
     * 修改货期
     * 
     * @param hlDeliveryTime 货期
     * @return 结果
     */
    @Override
    public int updateHlDeliveryTime(HlDeliveryTime hlDeliveryTime)
    {
        return hlDeliveryTimeMapper.updateHlDeliveryTime(hlDeliveryTime);
    }

    /**
     * 批量删除货期
     * 
     * @param deliveryIds 需要删除的货期主键
     * @return 结果
     */
    @Override
    public int deleteHlDeliveryTimeByDeliveryIds(Long[] deliveryIds)
    {
        return hlDeliveryTimeMapper.deleteHlDeliveryTimeByDeliveryIds(deliveryIds);
    }

    /**
     * 删除货期信息
     * 
     * @param deliveryId 货期主键
     * @return 结果
     */
    @Override
    public int deleteHlDeliveryTimeByDeliveryId(Long deliveryId)
    {
        return hlDeliveryTimeMapper.deleteHlDeliveryTimeByDeliveryId(deliveryId);
    }
}
